package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc CycleTypeInstanceDto
 * @使用场景
 */
@Data
public class CycleTypeInstanceDto extends BaseDto implements Serializable {

    /**
     * 周期类型实例ID:
     */
    @ApiModelProperty("周期类型实例ID")
    private String cycleTypeInstanceId;

    /**
     * 周期类型ID:
     */
    @ApiModelProperty("周期类型ID")
    private String cycleTypeId;

    /**
     * 周期类型实例标识:
     */
    @ApiModelProperty("周期类型实例标识")
    private String cycleTypeInstanceCode;

    /**
     * 周期类型实例名称:
     */
    @ApiModelProperty("周期类型实例名称")
    private String cycleStandardName;

    /**
     * 周期类型实例简称:
     */
    @ApiModelProperty("周期类型实例简称")
    private String cycleNumberShortName;

    /**
     * 排序:
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    /**
     * 主体生命周期:
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 是否存档:
     */
    @ApiModelProperty("是否存档")
    private String isArchive;

    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CycleTypeInstanceDto that = (CycleTypeInstanceDto) o;
        return (
                cycleTypeInstanceId == that.cycleTypeInstanceId &&
                        cycleTypeId == that.cycleTypeId &&
                        cycleTypeInstanceCode == that.cycleTypeInstanceCode &&
                        cycleStandardName == that.cycleStandardName &&
                        cycleNumberShortName == that.cycleNumberShortName &&
                        orderNumber == that.orderNumber &&
                        subjectLifeCycle == that.subjectLifeCycle &&
                        isArchive == that.isArchive &&
                        operationInductionId == that.operationInductionId &&
                        operateTime == that.operateTime
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                cycleTypeInstanceId,
                cycleTypeId,
                cycleTypeInstanceCode,
                cycleStandardName,
                cycleNumberShortName,
                orderNumber,
                subjectLifeCycle,
                isArchive,
                operationInductionId,
                operateTime
        );
    }

}
